Remove CONFIG_X86_SYSENTER option.
authorIan.Campbell@xensource.com <Ian.Campbell@xensource.com>
Fri, 21 Apr 2006 16:19:26 +0000 (17:19 +0100)
committerIan.Campbell@xensource.com <Ian.Campbell@xensource.com>
Fri, 21 Apr 2006 16:19:26 +0000 (17:19 +0100)
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
linux-2.6-xen-sparse/arch/i386/Kconfig
linux-2.6-xen-sparse/arch/i386/kernel/Makefile
linux-2.6-xen-sparse/arch/i386/kernel/asm-offsets.c
linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S
linux-2.6-xen-sparse/arch/i386/kernel/sysenter.c
linux-2.6-xen-sparse/arch/i386/kernel/vsyscall.S
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h

index 9687edf9f092941ce91d8b5cd81f189c14f5bc43..661d0bbecdb0f541a9dd335bc5adc32f02dcdb8b 100644 (file)
@@ -1180,11 +1180,6 @@ config X86_NO_TSS
        depends on X86_XEN
        default y
 
-config X86_SYSENTER
-       bool
-       depends on !X86_NO_TSS
-       default y
-
 config X86_NO_IDT
        bool
        depends on X86_XEN
index 5661a9bb6826136ca6b591cf2d3a70aced96a591..d0ccf7b37535fe237a404dd80359402ebf19bc32 100644 (file)
@@ -49,14 +49,12 @@ else
 vsyscall_note := vsyscall-note.o
 endif
 
-VSYSCALL_TYPES-y                       := int80
-VSYSCALL_TYPES-$(CONFIG_X86_SYSENTER)  += sysenter
 # vsyscall.o contains the vsyscall DSO images as __initdata.
 # We must build both images before we can assemble it.
 # Note: kbuild does not track this dependency due to usage of .incbin
-$(obj)/vsyscall.o: $(foreach F,$(VSYSCALL_TYPES-y),$(obj)/vsyscall-$F.so)
-targets += $(foreach F,$(VSYSCALL_TYPES-y),vsyscall-$F.o vsyscall-$F.so)
-targets += $(vsyscall_note) vsyscall.lds
+$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
+targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
+targets += vsyscall-note.o vsyscall.lds
 
 # The DSO images are built using a special linker script.
 quiet_cmd_syscall = SYSCALL $@
@@ -83,8 +81,7 @@ $(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o
 
 SYSCFLAGS_vsyscall-syms.o = -r
 $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
-                       $(foreach F,$(VSYSCALL_TYPES-y),$(obj)/vsyscall-$F.o) \
-                       $(obj)/$(vsyscall_note) FORCE
+                       $(obj)/vsyscall-sysenter.o $(obj)/$(vsyscall_note) FORCE
        $(call if_changed,syscall)
 
 ifdef CONFIG_XEN
index 3c4a0f46eb98b75227ff60630a3f6067f1003c4c..c7e3c078a20fd45c66768672a2c27f5de9379f32 100644 (file)
@@ -64,10 +64,13 @@ void foo(void)
        OFFSET(pbe_orig_address, pbe, orig_address);
        OFFSET(pbe_next, pbe, next);
 
-#ifdef CONFIG_X86_SYSENTER
+#ifndef CONFIG_X86_NO_TSS
        /* Offset from the sysenter stack to tss.esp0 */
        DEFINE(TSS_sysenter_esp0, offsetof(struct tss_struct, esp0) -
                 sizeof(struct tss_struct));
+#else
+       /* sysenter stack points directly to esp0 */
+       DEFINE(TSS_sysenter_esp0, 0);
 #endif
 
        DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
index 072172cda77e2c153a27da34892ef7c208d258ff..78ad19ef2b957a80cd5c4547b2f561fd5af17a2f 100644 (file)
@@ -202,7 +202,6 @@ need_resched:
        jmp need_resched
 #endif
 
-#ifdef CONFIG_X86_SYSENTER
 /* SYSENTER_RETURN points to after the "sysenter" instruction in
    the vsyscall page.  See vsyscall-sysentry.S, which defines the symbol.  */
 
@@ -250,7 +249,6 @@ sysenter_past_esp:
        xorl %ebp,%ebp
        sti
        sysexit
-#endif /* CONFIG_X86_SYSENTER */
 
 
        # system call handler stub
@@ -683,7 +681,7 @@ device_available_emulate:
        call math_state_restore
        jmp ret_from_exception
 
-#ifdef CONFIG_X86_SYSENTER
+#ifndef CONFIG_XEN
 /*
  * Debug traps and NMI can happen at the one SYSENTER instruction
  * that sets up the real kernel stack. Check here, since we can't
@@ -705,15 +703,15 @@ label:                                            \
        pushfl;                                 \
        pushl $__KERNEL_CS;                     \
        pushl $sysenter_past_esp
-#endif /* CONFIG_X86_SYSENTER */
+#endif /* CONFIG_XEN */
 
 KPROBE_ENTRY(debug)
-#ifdef CONFIG_X86_SYSENTER
+#ifndef CONFIG_XEN
        cmpl $sysenter_entry,(%esp)
        jne debug_stack_correct
        FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn)
 debug_stack_correct:
-#endif /* !CONFIG_X86_SYSENTER */
+#endif /* !CONFIG_XEN */
        pushl $-1                       # mark this as an int
        SAVE_ALL
        xorl %edx,%edx                  # error code 0
index 99193bb47fdcc1c6e68b6d118d9fb65c7ad1bb21..32e44f0f0152e956b308a15e3e036cf175deb109 100644 (file)
@@ -24,7 +24,7 @@ extern asmlinkage void sysenter_entry(void);
 
 void enable_sep_cpu(void)
 {
-#ifdef CONFIG_X86_SYSENTER
+#ifndef CONFIG_X86_NO_TSS
        int cpu = get_cpu();
        struct tss_struct *tss = &per_cpu(init_tss, cpu);
 
@@ -54,14 +54,12 @@ int __init sysenter_setup(void)
 {
        syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
 
-#ifdef CONFIG_X86_SYSENTER
        if (boot_cpu_has(X86_FEATURE_SEP)) {
                memcpy(syscall_page,
                       &vsyscall_sysenter_start,
                       &vsyscall_sysenter_end - &vsyscall_sysenter_start);
                return 0;
        }
-#endif
 
        memcpy(syscall_page,
               &vsyscall_int80_start,
index 432aa46649cc7a25cc3bf1aae71f2343cba18169..b403890fe39b35a54ea8f1312790d6fc6434cc6f 100644 (file)
@@ -7,11 +7,9 @@ vsyscall_int80_start:
        .incbin "arch/i386/kernel/vsyscall-int80.so"
 vsyscall_int80_end:
 
-#ifdef CONFIG_X86_SYSENTER
        .globl vsyscall_sysenter_start, vsyscall_sysenter_end
 vsyscall_sysenter_start:
        .incbin "arch/i386/kernel/vsyscall-sysenter.so"
 vsyscall_sysenter_end:
-#endif
 
 __FINIT
index 5b8d8be63934f882c3b4191a8cb8d84e7328847c..6c028021443c753996ffb23a7edb892b793bc6f6 100644 (file)
@@ -497,13 +497,11 @@ struct thread_struct {
 static inline void __load_esp0(struct tss_struct *tss, struct thread_struct *thread)
 {
        tss->esp0 = thread->esp0;
-#ifdef CONFIG_X86_SYSENTER
        /* This can only happen when SEP is enabled, no need to test "SEP"arately */
        if (unlikely(tss->ss1 != thread->sysenter_cs)) {
                tss->ss1 = thread->sysenter_cs;
                wrmsr(MSR_IA32_SYSENTER_CS, thread->sysenter_cs, 0);
        }
-#endif
 }
 #define load_esp0(tss, thread) \
        __load_esp0(tss, thread)